import jpl.*;

import java.io.BufferedWriter;
import java.io.PrintWriter;
import java.io.FileWriter;
import java.io.IOException;

public class Test {
	
	public static int fac(String S) {	
		try {
		    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("log.txt", true)));
		    out.println(S);
		    out.close();
			return 1;
		}
		catch (IOException e) {
		    //oh noes!
			return 0;
		}
	}
	
	public static int sentidos(int N) {
		Term response;
		switch (N) {
			case 1:	response = new Atom("yes");
                    break;
			case 2:	response = new Atom("no");
                    break;
			case 3:	response = new Atom("yes");
                    break;
			case 4:	response = new Atom("no");
                    break;
			case 5:	response = new Atom("yes");
                    break;
			default:	response = new Atom("no");
						break;
		}
		
		try {
		    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("log.txt", true)));
			out.println(N);
		    out.println(response.toString());
		    out.close();
		}
		catch (IOException e) {		    
		}
		
		if ( (N % 2) == 0)
		{
			return 1;
		}
		else
		{
			return 0;
		}		
		
	}
	
	public static Term fac2(int N) {
			Term list = new Atom("[]");
			for (int i = 5 - 1; i >= 0; --i) {
				list = new Compound(".", new Term[] { new Atom("yes"), list });
			}
			 
			try {
				PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("log2.txt", true)));
				out.println(list);
				out.println(list.arity());
				out.close();
			}
			catch (IOException e) {				
			}
			 
			return list;
	}	
	
	public static void main(java.lang.String argv[]) {
		//System.out.println(fac(0));
	}	

}
